package com.example.mvvm_base.base.viewmodel;

import android.app.Application;

import androidx.annotation.NonNull;
import androidx.lifecycle.AndroidViewModel;

import com.example.mvvm_base.base.model.BaseRepo;

public abstract class BaseViewModel<Repo extends BaseRepo> extends AndroidViewModel {
    protected Application application;
    protected Repo repo;


    public BaseViewModel(@NonNull Application application) {
        super(application);
        this.application=application;
        repo=createRepo();
    }

    protected abstract Repo createRepo();
}
